<?php
	include('../../../db.php');
	include("../styles/head_links.php");

	$email = $_GET['email'];

	$query = "UPDATE users SET confirmed = '1' WHERE email = :em";

	$statement = $db->prepare($query);
	$statement->bindValue(':em', $email);
	$statement->execute();
  
	$statement->closeCursor();

	$query = "SELECT * FROM  users WHERE email =  :em";
	
	$statement = $db->prepare($query);
	$statement->bindValue(':em', $email);
	$statement->execute();
	$user = $statement->fetch();

?>

<!DOCTYPE html>
<html>
<head>
	<title>Direct Order</title>	
	<style type="text/css">
		#logo{
			text-align: center;
			font-size: 3em;
			padding: .5em;
		}
		#main_container{
			width: 60em;
		}
	</style>
</head>
<body>
	<div id="logo">
	<h1>
		DirectOrder
	</h1>
	</div>
	<div id="main_container">
		<h2><?php echo strtoupper($user['name']); ?></h2>
		<h2>Thanks for registering with us!</h2>
	</div>
</body>
</html>
